package com.wanli.domain.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.util.List;

import com.wanli.common.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

@Data
@TableName("sys_user")
public class User extends BaseEntity {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @TableField("username")
    private String username;
    @TableField("password")
    private String password;
    @TableField("avatar")
    private String avatar;
    @TableField("email")
    private String email;
    @TableField("tel")
    private String tel;
    @TableField("created")
    private LocalDateTime created;
    @TableField("updated")
    private LocalDateTime updated;
    @TableField("last_login")
    private LocalDateTime lastLogin;
    @TableField("statu")
    private Integer statu;
    //角色集合: 当前用户具备什么样的角色
    @TableField(exist = false)
    private List<Role> roles;
}
